/**
* 批量修改替换修改文件内容
* v0.0.1
**/
var guiWriteData = require('./guiWriteData.js')
var path = require('path')
// 修改src/main.js

async function replaceData(){
	// console.log("修改./src/main.js 去掉mockXHR模拟数据");
	// await guiWriteData({
		// path:'../src/main.js',
		// str:`mockXHR\\(\\)`,
		// replaceStr:`\/\/ mockXHR()`
	// })
	// console.log("修改./src/main.js 添加公共弹出方法");
	// await guiWriteData({
		// path:'../src/main.js',
		// str:`import router from './router'`,
		// replaceStr:`import router from './router'
// import guiMain from './utils/gui_main'
// Vue.use(guiMain)`
	// })
	// console.log("修改src/router 路由都统一放一起");  // 直接文件替换吧  过于复杂无法正则
	// await guiWriteData({
		// path:'../src/router.js',
		// str:`import Vue from 'vue'`,
		// replaceStr:`import Vue from 'vue''
// import routers from './routers.js'`
	// })
	// await guiWriteData({
		// path:'../src/router.js',
		// str:`import Vue from 'vue'`,
		// replaceStr:`import Vue from 'vue''
// import routers from './routers.js'`
	// })
	console.log('添加全局加载状态');
	await guiWriteData({
		path:'../src/store/modules/app.js',
		str:`device: 'desktop',`,
		replaceStr:`device: 'desktop',
	ajaxLoading:false,`
	})
	console.log('修改代理地址')
	// vue.config.js 文件直接替换吧
	// await guiWriteData({
		// path:'../src/store/modules/app.js',
		// str:`device: 'desktop',`,
		// replaceStr:`device: 'desktop',
	// ajaxLoading:false,`
	// })
	
}
replaceData()
